package com.fish.spider.pojo;

import com.google.gson.Gson;
import lombok.Data;

@Data
public class BaiduFeedResult {
    private String status;
    private String logid;
    private BaiduFeedIndex data;
    private String message;

    public static void main(String[] args) {
        String json = "{\n" +
                "    \"status\": 0,\n" +
                "    \"data\": {\n" +
                "        \"index\": [\n" +
                "            {\n" +
                "                \"key\": [\n" +
                "                    {\n" +
                "                        \"name\": \"\\u901a\\u8d27\\u81a8\\u80c0\",\n" +
                "                        \"wordType\": 1\n" +
                "                    }\n" +
                "                ],\n" +
                "                \"startDate\": \"2024-05-02\",\n" +
                "                \"endDate\": \"2024-05-31\",\n" +
                "                \"data\": \"47C-AcOO4-AcGCO24-cG-G7OOcCG-OGOc-G,GGfcGA,-COcG27O2AcOCAf2fcf,A-O-cG,G,AOcG7474-cC-,-A-cCCAAGOcA,2,4AcAO2,A-c-2-4--cGCG2f-cGO242Oc-,4G2-c-GGCCOcG4OCOfcG-,4,OcGOfGfOcGf74O-cG2O--AcGACO-AcGG472fcOA4CfcCG4,7f\",\n" +
                "                \"type\": \"day\",\n" +
                "                \"generalRatio\": {\n" +
                "                    \"avg\": 256863,\n" +
                "                    \"yoy\": -23,\n" +
                "                    \"qoq\": \"-\"\n" +
                "                }\n" +
                "            },\n" +
                "            {\n" +
                "                \"key\": [\n" +
                "                    {\n" +
                "                        \"name\": \"\\u9ec4\\u91d1\\u4ef7\\u683c\",\n" +
                "                        \"wordType\": 1\n" +
                "                    }\n" +
                "                ],\n" +
                "                \"startDate\": \"2024-05-02\",\n" +
                "                \"endDate\": \"2024-05-31\",\n" +
                "                \"data\": \"f,G4CAcf,774fcC7f4-Oc4f7A-Ac4CAfGOc4f-4Cfc2-OfOOc2G-fA-cf,,-GAcCO7A4-cfG4GCfcC,74ffc-CAf--c-G7G-OcGACAOfcG-,2,-cGfC-4AcGG,A,fc-G4-fAc-C--7AcGOO,4-cGOC47fcGfAO,-cG4C,OfcC,72-Oc-4G7COc7f,4GfcfGAA4-c-f7OOOcGf7,AA\",\n" +
                "                \"type\": \"day\",\n" +
                "                \"generalRatio\": {\n" +
                "                    \"avg\": 334537,\n" +
                "                    \"yoy\": 323,\n" +
                "                    \"qoq\": -53\n" +
                "                }\n" +
                "            }\n" +
                "        ],\n" +
                "        \"uniqid\": \"cc9e833f9b575a3024e93ce06e016bb3\"\n" +
                "    },\n" +
                "    \"logid\": 2346119646,\n" +
                "    \"message\": \"success\"\n" +
                "}";
        Gson gson = new Gson();
        BaiduFeedResult baiduFeedResult = gson.fromJson(json, BaiduFeedResult.class);
        System.out.println(baiduFeedResult.toString());
    }
}
